package com.cn.star.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import com.cn.star.web.entity.User;
import com.cn.star.web.service.UserService;

@EnableAutoConfiguration
@RestController
public class IndexController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping("/index")
	public ModelAndView index() {
		User user = userService.selectUser("1111111","2222");
		System.out.println(user);
		return new ModelAndView("/index");
	}
	
	
	@RequestMapping("/login")
	public ModelAndView login() {
		return new ModelAndView("/login");
	}
}
